home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / DO1002.ARJ / MATH.SCR < prev    next >
Text File  |  1991-12-13  |  2KB  |  45 lines

  1. .pg wi full clr cy
  2.     COMMAND NAME»gray«: »%t« Math »ye«
  3.  
  4.     /MATH {Variable} {Formula}
  5. /cw
  6.     The »%t«Math»#« command evaluates »cy«{formula}»#« and stores the
  7.     result in the Result variable indicated by
  8.     »cy«{Variable}»#«. »wh«Variables in »cy«{formula}»wh« are
  9.     expanded.»#«
  10. .pg clr
  11.     The »%t«Math»#« command supports the following functions:
  12. .wi 1 7 79 22
  13.     »wh«+»#«         Addition               »wh«/»#«    Division
  14.     »wh«-»#«         Subtraction            »wh«^»#«    Exponentiation
  15.     »wh«*»#«         Multiplication         »wh«()»#«   Grouping
  16.     »wh«ABS»#«       Returns the absolute value of the argument
  17.     »wh«ATAN»#«      Returns the arctangent of the argument
  18.     »wh«COS»#«       Returns the cosine of the argument
  19.     »wh«EXP»#«       Returns the exponential
  20.     »wh«LN»#«        Returns the natural logarithm of the argument
  21.     »wh«ROUND»#«     Rounds a real number to an integer
  22.     »wh«SIN»#«       Returns the sine of the argument
  23.     »wh«SQRT»#«      Returns the square root of the argument
  24.     »wh«SQR»#«       Returns the square of the argument
  25.     »wh«TRUNC»#«     Truncates a real to an integer
  26. .pg wi 1 5 79 22 clr
  27.     Here are some »%t«/MATH»#« commands and their results:
  28. .go 1 11
  29. |/MATH Num1 5*3
  30. .go 4 10
  31. »gr«Result»gy«:»wh« %Num1(#,###,###.##-)»#«
  32. |/MATH Num1 LN(25)
  33. .go 4 10
  34. »gr«Result»gy«: »wh«%Num1(#,###,###.##-)»#«
  35. |/MATH Num1 25
  36. |/MATH Num1 (%Num1/10)*SQRT(%Num1)
  37. .go 4 10
  38. »gr«Result»gy«: »wh«%Num1(#,###,###.##-)»#«
  39. |/SET Var1 10
  40. |/MATH Num1 %Var1^3
  41. .go 4 10
  42. »gr«Result»gy«: »wh«%Num1(#,###,###.##-)»#«
  43.  
  44. /ENDEXEC CLEAR
  45.